/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.jbr.simplefoodplan.gwt.client;

import com.google.gwt.core.client.JavaScriptObject;

/**
 *
 * @author jbr
 */
public class Dish extends JavaScriptObject  {

    protected Dish() {}

    

    public final native String getId() /*-{ return this.id; }-*/;
    public final native String getName() /*-{ return this.name; }-*/;
    public final native void setName(String newname) /*-{ this.name = newname; }-*/;
    public final native void setId(String newid) /*-{ this.id = newid; }-*/;
    public final native String getLastUsageInDays() /*-{ return this.lastUsageInDays; }-*/;
    public final native boolean isUsed() /*-{ return this.used==null?false:this.used; }-*/;

    public final boolean equals(Dish dish) {
        System.out.println("Equals run");
        if (getId() == null)
            return false;
        return getId().equals(dish.getId());
    }

}
